From cb248d6b162460b1dd25a08b77f377a885ba48ae Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Wed, 16 Nov 2005 11:31:57 +0100 Subject: [PATCH] The following patch removes every (hopefully) reference to network-limit. Upon further investigation it sets Device parameters that don't exist any longer, thus causing exceptions. As it looks like this is completely obsolete, and no one is actively working on it, we should just rip it out to end the confusion. Signed-off-by: Sean Dague --- docs/man/xm.pod.1 | 4 ---- tools/python/xen/xend/XendClient.py | 7 ------- tools/python/xen/xend/XendDomain.py | 11 ----------- tools/python/xen/xm/main.py | 11 ----------- 4 files changed, 33 deletions(-) diff --git a/docs/man/xm.pod.1 b/docs/man/xm.pod.1 index b0b57f12f5..7f34196220 100644 --- a/docs/man/xm.pod.1 +++ b/docs/man/xm.pod.1 @@ -645,10 +645,6 @@ I<[mac=macaddr]> I<[bridge=bridge-name]> I<[backend=bedomain-id]> =item B I I -=item B I I I I - -Limit the transmission rate of a virtual network interface. - =item B I List virtual network interfaces for a domain. The returned output is diff --git a/tools/python/xen/xend/XendClient.py b/tools/python/xen/xend/XendClient.py index 6af92beec7..75a106ad54 100644 --- a/tools/python/xen/xend/XendClient.py +++ b/tools/python/xen/xend/XendClient.py @@ -302,13 +302,6 @@ class Xend: {'op' : 'set_vcpus', 'vcpus' : vcpus }) - def xend_domain_vif_limit(self, id, vif, credit, period): - return self.xendPost(self.domainurl(id), - { 'op' : 'vif_limit_set', - 'vif' : vif, - 'credit' : credit, - 'period' : period }) - def xend_domain_devices(self, id, type): return self.xendPost(self.domainurl(id), {'op' : 'devices', diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index a429852788..d6173081ab 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -467,17 +467,6 @@ class XendDomain: except Exception, ex: raise XendError(str(ex)) - - def domain_vif_limit_set(self, domid, vif, credit, period): - """Limit the vif's transmission rate - """ - dominfo = self.domain_lookup(domid) - dev = dominfo.getDevice('vif', vif) - if not dev: - raise XendError("invalid vif") - return dev.setCreditLimit(credit, period) - - def domain_maxmem_set(self, domid, mem): """Set the memory limit for a domain. diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index fc0521fe3f..f3fd00f6d9 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -118,8 +118,6 @@ xm full list of subcommands: Create a new virtual network device network-detach Destroy a domain's virtual network device, where is the device ID. - network-limit - Limit the transmission rate of a virtual network interface network-list List virtual network interfaces for a domain Vnet commands: @@ -557,13 +555,6 @@ def xm_log(args): from xen.xend.XendClient import server print server.xend_node_log() -def xm_network_limit(args): - arg_check(args,4,"network-limit") - dom = args[0] - v = map(int, args[1:4]) - from xen.xend.XendClient import server - server.xend_domain_vif_limit(dom, *v) - def xm_network_list(args): arg_check(args,1,"network-list") dom = args[0] @@ -716,7 +707,6 @@ commands = { # network "network-attach": xm_network_attach, "network-detach": xm_network_detach, - "network-limit": xm_network_limit, "network-list": xm_network_list, # vnet "vnet-list": xm_vnet_list, @@ -739,7 +729,6 @@ for c in subcommands: aliases = { "balloon": "mem-set", "vif-list": "network-list", - "vif-limit": "network-limit", "vbd-create": "block-create", "vbd-destroy": "block-destroy", "vbd-list": "block-list", -- 2.30.2